﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LI4.Presentation
{
    public partial class NovaArea : Form
    {
        public NovaArea()
        {
            InitializeComponent();
        }

        private void okB_Click(object sender, EventArgs e)
        {
            string nome = nomeTB.Text.Trim();

            Business.Area area = new Business.Area();
            area.Nome = nome;
            Data.Area insAr = new Data.Area();
            insAr.Inserir(area);
            MessageBox.Show(this, "Nova Area Inserida!", "Nova Area.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            this.Dispose();
        }

        private void NovaArea_Shown(object sender, EventArgs e)
        {
            nomeTB.Focus();
        }
    }
}
